package com.cn.service.server.Equipment.Impl;

import com.cn.bean.pojo.lbj.*;
import com.cn.bean.vo.Equipment.ComponentBasicInformation;
import com.cn.mapper.dao.db5.Equipment.ComponentGroupDao;
import com.cn.service.server.Equipment.ComponentGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ComponentGroupServiceImpl implements ComponentGroupService {
    @Autowired(required = false)
    private ComponentGroupDao componentGroupDao;
    @Override
    public List<ComponentGroupBasicMainTable> selectComponentBasic(ComponentGroupBasicMainTable componentGroupBasicMainTable) {
        return componentGroupDao.selectComponentBasic(componentGroupBasicMainTable);
    }

    @Override
    public List<ComponentGroupBasicSubTable> selectComponentGroupBasicSub(ComponentGroupBasicSubTable componentGroupBasicSubTable) {
        return componentGroupDao.selectComponentGroupBasicSub(componentGroupBasicSubTable);
    }

    @Override
    public List<ComponentGroupBasicSubTable> selectBasicSub(int id) {
        return componentGroupDao.selectBasicSub(id);
    }

    @Override
    public List<ComponentGroupSettingMainTable> selectComponentGroup(ComponentGroupSettingMainTable componentGroupSettingMainTable) {
        return componentGroupDao.selectComponentGroup(componentGroupSettingMainTable);
    }

    @Override
    public List<ComponentGroupSettingSubTable> selectComponentGroupSub(ComponentGroupSettingSubTable componentGroupSettingSubTable) {
        return componentGroupDao.selectComponentGroupSub(componentGroupSettingSubTable);
    }

    @Override
    public List<ComponentGroupUpdateMainTable> selectComponentUpdate(ComponentGroupUpdateMainTable componentGroupUpdateMainTable) {
        return componentGroupDao.selectComponentUpdate(componentGroupUpdateMainTable);
    }

    @Override
    public List<ComponentGroupUpdateSubTable> selectComponentGroupUpdateSub(ComponentGroupUpdateSubTable componentGroupUpdateSubTable) {
        return componentGroupDao.selectComponentGroupUpdateSub(componentGroupUpdateSubTable);
    }

    @Override
    public List<ComponentBasicInformationTable> selectComponentBasicInformationTable(ComponentBasicInformationTable componentBasicInformationTable) {
        return componentGroupDao.selectComponentBasicInformationTable(componentBasicInformationTable);
    }

    @Override
    public List<SingleRegistrationTable> selectMain(SingleRegistrationTable singleRegistrationTable) {
        return componentGroupDao.selectMain(singleRegistrationTable);
    }

    @Override
    public List<SingleRegistrationTableSub> selectSub(SingleRegistrationTableSub sub) {
        return componentGroupDao.selectSub(sub);
    }

    @Override
    public List<SingleRegistrationTableSub> selectSingleSub(SingleRegistrationTableSub sub) {
        return componentGroupDao.selectSingleSub(sub);
    }


    @Override
    public Integer getComponentGroupSettingAutoid() {

        return componentGroupDao.getComponentGroupSettingAutoid();
    }

    @Override
    public Integer getComponentGroupSettingSubAutoid() {
        return componentGroupDao.getComponentGroupSettingSubAutoid();
    }

    @Override
    public int insertComponentGroupSetting(ComponentGroupSettingMainTable componentGroupSettingMainTable) {
        Boolean a=componentGroupDao.insertComponentGroupSetting(componentGroupSettingMainTable);
        if (a){
            return 1;
        }
        return 0;
    }

    @Override
    public int insertComponentGroupSettingSub(ComponentGroupSettingSubTable componentGroupSettingSubTable) {
        Boolean b=componentGroupDao.insertComponentGroupSettingSub(componentGroupSettingSubTable);
        if(b){
            return 1;
        }
        return 0;
    }

    @Override
    public int insertComponentGroupUpdate(ComponentGroupUpdateMainTable componentGroupUpdateMainTable) {
        Boolean c=componentGroupDao.insertComponentGroupUpdate(componentGroupUpdateMainTable);
        if (c){
            return 1;
        }
        return 0;
    }

    @Override
    public int insertComponentGroupUpdateSub(ComponentGroupUpdateSubTable componentGroupUpdateSubTable) {
        Boolean d=componentGroupDao.insertComponentGroupUpdateSub(componentGroupUpdateSubTable);
        if (d){
            return 1;
        }
        return 0;
    }

    @Override
    public int insertComponentGroupBasicMain(ComponentGroupBasicMainTable componentGroupBasicMainTable) {
        Boolean e=componentGroupDao.insertComponentGroupBasicMain(componentGroupBasicMainTable);
        if (e){
            return 1;
        }
        return 0;
    }

    @Override
    public int insertComponentGroupBasicSub(ComponentGroupBasicSubTable componentGroupBasicSubTable) {
        Boolean f=componentGroupDao.insertComponentGroupBasicSub(componentGroupBasicSubTable);
        if (f){
            return 1;
        }
        return 0;
    }

    @Override
    public int updateComponentGroupSetting(ComponentGroupSettingMainTable componentGroupSettingMainTable) {
        Boolean g=componentGroupDao.updateComponentGroupSetting(componentGroupSettingMainTable);
        if (g){
            return 1;
        }
        return 0;
    }

    @Override
    public int updateComponentGroupUpdate(ComponentGroupUpdateMainTable componentGroupUpdateMainTable) {
        Boolean h=componentGroupDao.updateComponentGroupUpdate(componentGroupUpdateMainTable);
        if (h){
            return 1;
        }
        return 0;
    }

    @Override
    public int updateComponentGroupBasic(ComponentGroupBasicMainTable componentGroupBasicMainTable) {
        Boolean s=componentGroupDao.updateComponentGroupBasic(componentGroupBasicMainTable);
        if (s){
            return 1;
        }
        return 0;
    }

    @Override
    public int delComponentGroupSettingSub(int id) {
        Boolean x=componentGroupDao.delComponentGroupSettingSub(id);
        if (x){
            return 1;
        }
        return 0;
    }

    @Override
    public int delComponentGroupUpdateSub(int id) {
        Boolean y=componentGroupDao.delComponentGroupUpdateSub(id);
        if(y){
            return 1;
        }
        return 0;
    }

    @Override
    public int delComponentGroupBasicSub(int id) {
        Boolean z=componentGroupDao.delComponentGroupBasicSub(id);
        if (z){
            return 1;
        }
        return 0;
    }

    @Override
    public int updateGroupStatus(int id) {
        Boolean n=componentGroupDao.updateGroupStatus(id);
        if(n){
            return 1;
        }
        return 0;
    }

    @Override
    public int updateSettingStatus(int id) {
        Boolean m=componentGroupDao.updateSettingStatus(id);
        if (m){
            return 1;
        }
        return 0;
    }
}
